package cn.wolfcode.trip.base.domain;

import lombok.Getter;
import lombok.Setter;
import java.util.Date;


/**
 * 收藏表
 */
@Setter
@Getter
public class Collect extends BaseDomain {

    /*类型常量*/
    public static final Integer TYPE_NEWS = 1; //日报
    public static final Integer TYPE_STRATEGY = 2; //攻略
    public static final Integer TYPE_TRAVEL = 3; //游记

    private Long userId;//用户id

    private Integer type=0;//收藏类型

    private Long collectId;//收藏内容的id

    private String title;//收藏内容的title

    private String coverUrl;//收藏内容的封面

    private Date collectTime;//收藏时间

    public String getTypeName(){
        String name= "";
        if(type==TYPE_NEWS){
            name="日报";
        }else  if(type==TYPE_STRATEGY){
            name="攻略";
        } if(type==TYPE_TRAVEL){
            name="游记";
        }
        return name;
    }

}